.malloy-chart {
  width: fit-content;
  height: fit-content;
  font-variant-numeric: tabular-nums;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.malloy-chart_debug_menu {
  width: fit-content;
  position: absolute;
  top: 0px;
  right: 0px;
  color: #666;
  padding: 2px;
  border-radius: 4px;
  background: white;
  width: 28px;
  height: 28px;
  border: 1px solid #eee;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.malloy-chart:hover .malloy-chart_debug_menu,
.malloy-chart_debug_menu:hover {
  display: flex;
}

.malloy-chart_debug_menu:hover {
  color: black;
  border-color: #246ae9;
}

.malloy-chart_debug_icon {
  width: 16px;
}

.malloy-chart__titles-bar {
  padding-inline: 8px;
  padding-top: 8px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  line-height: calc(var(--malloy-render--table-row-height) * 5 / 7 - 1px);
  grid-row: 1;
}

.malloy-chart__title {
  font-weight: bold;
}

.malloy-chart__container {
  grid-row: 2;
  overflow: hidden;
}

.malloy-chart .y_reference_lines_backdrop {
  -webkit-mask-image: linear-gradient(
    transparent 0%,
    black 27.7%,
    black 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    transparent 0%,
    black 27.7%,
    black 70%,
    transparent 100%
  );
}
